﻿using System;
using Birkelund.QueryStrings.Internals;
using System.ComponentModel;

namespace Birkelund.QueryStrings.Test
{
    internal enum TestEnum
    {
        EnumValue0 = 0,
        EnumValue1,
        EnumValue2,
        EnumValue3,
        EnumValue4
    }

    [Flags]
    internal enum TestFlagEnum
    {
        EnumValue1 = 0x0002, // = 2
        EnumValue2 = 0x0004, // = 4
        EnumValue3 = 0x0008, // = 8
        EnumValue4 = 0x0010, // = 16
        EnumValue5 = 0x0020, // = 32
        EnumValue6 = 0x0040  // = 64
    }

    public enum CalculatorType
    {
        Hash,
        Basic
    }

    internal class TestUtil
    {
        public static IChecksumCalculator GetStrategy(CalculatorType type)
        {
            switch (type)
            {
                case CalculatorType.Hash: return new HashChecksumCalculator();
                case CalculatorType.Basic: return new BasicChecksumCalculator();
                default: throw new InvalidEnumArgumentException();
            }
        }
    }
}
